package cn.tedu.sp09.feign;

import cn.tedu.sp01.pojo.Order;
import cn.tedu.sp01.util.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;


/**
 * @author 张琪
 * @date 2020/12/22
 * @describe 订单业务, 这里为生产者和, 请求的路径为该业务内的请求路径
 */
@FeignClient(name = "order-service", fallback = OrderClientFB.class)
public interface OrderClient {

    @GetMapping("/{orderId}")
    JsonResult<Order> getOrder(@PathVariable String orderId);

    @GetMapping("/")
    JsonResult<?> addOrder();
}
